home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209b.zip / octave-2.09 / DLFCN.ZIP / dlfcn / octave / ov-va-args.h < prev    next >
C/C++ Source or Header  |  1997-08-20  |  2KB  |  92 lines

  1. /*
  2.  
  3. Copyright (C) 1996 John W. Eaton
  4.  
  5. This file is part of Octave.
  6.  
  7. Octave is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2, or (at your option) any
  10. later version.
  11.  
  12. Octave is distributed in the hope that it will be useful, but WITHOUT
  13. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15. for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Octave; see the file COPYING.  If not, write to the Free
  19. Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. */
  22.  
  23. #if !defined (octave_all_va_args_h)
  24. #define octave_all_va_args_h 1
  25.  
  26. #include <cstdlib>
  27.  
  28. #include <string>
  29.  
  30. class ostream;
  31.  
  32. #include "mx-base.h"
  33. #include "str-vec.h"
  34.  
  35. #include "error.h"
  36. #include "ov-base.h"
  37. #include "ov-typeinfo.h"
  38.  
  39. class Octave_map;
  40. class octave_value_list;
  41.  
  42. class tree_walker;
  43.  
  44. // A type to represent `all_va_args' as used in function calls.
  45.  
  46. class
  47. octave_all_va_args : public octave_base_value
  48. {
  49. public:
  50.  
  51.   octave_all_va_args (void)
  52.     : octave_base_value () { }
  53.  
  54.   octave_all_va_args (const octave_all_va_args&)
  55.     : octave_base_value () { }
  56.  
  57.   ~octave_all_va_args (void) { }
  58.  
  59.   octave_value *clone (void) { return new octave_all_va_args (*this); }
  60.  
  61.   bool is_defined (void) const { return true; }
  62.  
  63.   bool is_all_va_args (void) const { return true; }
  64.  
  65.   void print (ostream& os, bool pr_as_read_syntax = false);
  66.  
  67.   int type_id (void) const { return t_id; }
  68.  
  69.   string type_name (void) const { return t_name; }
  70.  
  71.   static int static_type_id (void) { return t_id; }
  72.  
  73.   static void register_type (void)
  74.     { t_id = octave_value_typeinfo::register_type (t_name); }
  75.  
  76. private:
  77.  
  78.   // Type id of all_va_arg objects, set by register_type().
  79.   static int t_id;
  80.  
  81.   // Type name of all_va_arg objects, defined in ov-va-args.cc.
  82.   static const string t_name;
  83. };
  84.  
  85. #endif
  86.  
  87. /*
  88. ;;; Local Variables: ***
  89. ;;; mode: C++ ***
  90. ;;; End: ***
  91. */
  92.